package com.gdkj.enums;

public enum BloodProductTypeEnums {
    RED_PACKAGE_COUPON(1, "红包券"),
    TELEPHONE_BILL_COUPON(2, "话费券"),
    COIN(3, "金币"),
    GOLD_BEAN(4, "金豆"),
    ENERGY(5, "钻石"),
    LUCK_COIN(6, "幸运币");

    private Integer type;

    private String name;

    BloodProductTypeEnums(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String findByType(Integer type) {
        BloodProductTypeEnums[] enums = BloodProductTypeEnums.values();
        for (BloodProductTypeEnums bloodProductTypeEnums : enums){
            if(bloodProductTypeEnums.type.equals(type)){
                return bloodProductTypeEnums.name;
            }
        }
        return "";
    }
}
